Benjamin Otte [Wed, 6 Mar 2019 11:39:56 +0000 (12:39 +0100)]
rendernode: Add can_diff implementation for transform nodes
That one was missing and killing performance in the fishbowl.
Timm Bäder [Wed, 6 Mar 2019 08:03:17 +0000 (09:03 +0100)]
entry: Update CSS node docs
Remove all the nodes that are subnodes of GtkText nowadays and refer to
the GtkText docs instead.
Timm Bäder [Tue, 5 Mar 2019 08:03:11 +0000 (09:03 +0100)]
gl renderer: Cache rendered fallback nodes
Timm Bäder [Tue, 5 Mar 2019 08:00:55 +0000 (09:00 +0100)]
gl renderer: Mark pointer textures as used
Otherwise we remove them, causing additional texture uploads.
Benjamin Otte [Tue, 5 Mar 2019 08:27:30 +0000 (09:27 +0100)]
transform: Add perspective()
This commit adds gsk_transform_perspective(), gtk_snapshot_perspective()
and support for perspective() in the CSS syntax.
Benjamin Otte [Mon, 4 Mar 2019 21:11:57 +0000 (22:11 +0100)]
rendernode: Implement diffing of transform nodes
This reinstates diffing in the same way that it worked for offset nodes.
It would be possible to add diffing for affine transforms or even all
transforms, but I think this is unnecessary right now - and also quite
expensive to compute.
Benjamin Otte [Mon, 4 Mar 2019 20:43:44 +0000 (21:43 +0100)]
transform: Readd optimization
This is the optimization from
bbd4e2f60d9e060fbe3b0c2dcebcd1d6b7335a2a
Benjamin Otte [Mon, 4 Mar 2019 18:33:04 +0000 (19:33 +0100)]
transform: Redo querying API
Make the API expect a tranform of the proper category instead of
doing the check ourselves and returning TRUE/FALSE.
The benefit is that the mai use case is switch (transform->category)
statements and in those we know the category and don't need to check
TRUE/FALSE.
Using the wrong matrix will now cause a g_warning().
Benjamin Otte [Mon, 4 Mar 2019 08:20:58 +0000 (09:20 +0100)]
transform: Store the category in the transform
... instead of computing it every time we need it.
This should be faster and we want to use it a lot more prominently.
Also, we have the struct memory available anyway.
Benjamin Otte [Sun, 3 Mar 2019 16:57:11 +0000 (17:57 +0100)]
transform: Implement gsk_transform_invert()
And use it.
And test it.
Benjamin Otte [Sat, 2 Mar 2019 10:46:07 +0000 (11:46 +0100)]
transform: Remove gsk_transform_identity()
This used to be a good idea back when GskTransform was intended to be
used for transitions, but without it, it's not anymore.
Benjamin Otte [Sat, 2 Mar 2019 04:15:47 +0000 (05:15 +0100)]
widget: Make transform a GskTransform
This concludes pushing transforms down into GskTransform.
What's remaining is potentially pushing it further into the renderers.
Benjamin Otte [Sat, 2 Mar 2019 03:39:46 +0000 (04:39 +0100)]
testsuite: Add a transforms test
In particular, check that to_matrix() and to_2d(), to_affine() and
to_translate() return the same values.
This also requires a recent Graphene version or the tests will fail.
Benjamin Otte [Sat, 2 Mar 2019 03:35:44 +0000 (04:35 +0100)]
trasnform: Fix print statement
We were printing the wrong variable.
Benjamin Otte [Sat, 2 Mar 2019 02:21:09 +0000 (03:21 +0100)]
transform: Split rotate() and rotate3d() class
This is mainly for accuracy: We can guarantee the math we do for 2D
rotations results in a 2D matrix.
Benjamin Otte [Fri, 1 Mar 2019 06:51:23 +0000 (07:51 +0100)]
transform: Make category public API
Also rename it from GskMatrixCategory to GskTransformCategory.
Benjamin Otte [Fri, 1 Mar 2019 05:48:30 +0000 (06:48 +0100)]
transform: Remove API to poke internals
It is not interesting to users of GskTransform how it is made up
internally. Users should just use the gsk_transform_to_*() APIs.
Benjamin Otte [Fri, 1 Mar 2019 05:35:55 +0000 (06:35 +0100)]
rendernode: Make the transform node take a GskTransform
This is an attempt to push GskTransform deeper into the stack.
Benjamin Otte [Fri, 1 Mar 2019 05:24:33 +0000 (06:24 +0100)]
transform: Add more API
In particular, add a per-category querying API for the matrix:
- gsk_transform_to_translate()
- gsk_transform_to_affine()
- gsk_transform_to_2d()
- gsk_transform_to_matrix()
This way, code can use the relevant one for the given category.
Benjamin Otte [Thu, 28 Feb 2019 08:52:49 +0000 (09:52 +0100)]
transform: Move to GSK
The renaming of the prefix makes this a large patch.
Matthias Clasen [Mon, 4 Mar 2019 17:36:10 +0000 (17:36 +0000)]
Merge branch 'adwaita-typo-fix-master' into 'master'
Adwaita: Fix typo (missing comma)
Closes #1713
See merge request GNOME/gtk!618
Christoph Reiter [Sun, 3 Mar 2019 09:38:18 +0000 (10:38 +0100)]
treeview: make sure separator nodes have a height > 0
In case the theme doesn't set a height/min-height for the treeview
separator the treeview drawing gets confused and draws rows on top of each
other depending on the redraw area.
This is due to gtk_tree_view_get_row_height() assuming that a node with a
height <= 0 is not set and not a separator and it will default to the
expander size.
Ideally gtk_tree_view_get_row_height() would know if it operates on a separator,
but there are too many calls/levels, so just make sure the separator height
is at least 1 (Adwaita already sets "min-height: 2px", so no change there)
Cherry-picked from !614 to master
Alex Monday [Mon, 4 Mar 2019 15:30:43 +0000 (15:30 +0000)]
Adwaita: Fix typo (missing comma)
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1713
(cherry picked from commit
0b61d6f6aef9fba35e896ac437a66b78eb649f75)
Emmanuele Bassi [Mon, 4 Mar 2019 11:35:18 +0000 (11:35 +0000)]
Merge branch 'notebook-notify-page-not-child' into 'master'
notebook: Notify the notebook page, not the child
See merge request GNOME/gtk!616
Matthias Clasen [Mon, 4 Mar 2019 03:55:34 +0000 (22:55 -0500)]
search entry: Fix a copy-paste error
Matthias Clasen [Mon, 4 Mar 2019 03:14:19 +0000 (22:14 -0500)]
entries: Fix mnemonic activation
Since entries are no longer can-focus, the default
mnemonic_activate handler refuses to act on them.
Peter Bloomfield [Sun, 3 Mar 2019 23:21:10 +0000 (18:21 -0500)]
notebook: Notify the notebook page, not the child
Call g_object_notify() on the GtkNotebookPage, not the child GtkWidget.
Fixes some issues in !594.
Benjamin Otte [Sun, 3 Mar 2019 18:40:32 +0000 (19:40 +0100)]
widget: Fix gtk_widget_pick() on 3d-transformed widgets
Picking is done by drawing a line along the parent's z axis and picking
at the intersection with the child's z=0 plane.
However, the previous code was casting a ray along the child's z axis.
This patch actually transforms the line to pick into the target's
coordinate system and then computes the corrrect intersection with the
z=0 plane.
Using graphene_point3d_interpolate() to compute the final intersection
point is a bit of abuse of that function, but I found no better way in
Graphene to achieve the same thing.
Matthias Clasen [Sun, 3 Mar 2019 17:42:20 +0000 (12:42 -0500)]
gtk-demo: Minimally fix the sarch entry demo
This was broken by the entry refactoring.
Matej Urbančič [Sat, 2 Mar 2019 19:57:57 +0000 (20:57 +0100)]
Updated Slovenian translation
Timm Bäder [Sat, 2 Mar 2019 04:28:55 +0000 (05:28 +0100)]
Fix compile time warnings
Timm Bäder [Sat, 2 Mar 2019 04:25:43 +0000 (05:25 +0100)]
a11y: Include gtktextaccesible.h in gtk-a11y.h
Closes #1710
Emmanuele Bassi [Fri, 1 Mar 2019 12:23:26 +0000 (12:23 +0000)]
Merge branch 'redundant-editable-api' into 'master'
entry, spin button: Drop redundant API
See merge request GNOME/gtk!611
Matthias Clasen [Thu, 28 Feb 2019 19:31:36 +0000 (14:31 -0500)]
entry, spin button: Drop redundant API
Avoid duplicating GtkEditable APIs. Port existing users.
Timm Bäder [Thu, 28 Feb 2019 08:44:08 +0000 (09:44 +0100)]
roundedrect: Add gsk_rounded_rect_to_string
Keep it private for now, but it's very useful when debugging.
Timm Bäder [Thu, 28 Feb 2019 09:12:17 +0000 (10:12 +0100)]
gl renderer: Change shadow cache eviction strategy
Since we can do partial redraws, dropping every shadow that's been
unused for one frame happens too fast. This is also a problem when a
shadow gets drawn on a texture for a few frames.
Timm Bäder [Tue, 26 Feb 2019 05:49:59 +0000 (06:49 +0100)]
gl renderer: Ignore nodes with nan bounds
This can happen for certain transform nodes. The transform node's
child's bounds are fine, but the transform node bounds are all nan.
Just ignore those bounds since we can't meaningfully render them anyway.
Timm Bäder [Tue, 26 Feb 2019 06:24:18 +0000 (07:24 +0100)]
transformnode: Avoid matrix multiplication if we can
If the given matrix is explicitly of category IDENTITY, we don't need to
do anything, and in the 2D_TRANSLATE case, just offset the child bounds.
Those are the two most common cases.
Timm Bäder [Tue, 26 Feb 2019 06:17:08 +0000 (07:17 +0100)]
gl renderer: Add more nodes that support transforms
Matthias Clasen [Thu, 28 Feb 2019 04:47:39 +0000 (23:47 -0500)]
entry: Don't use the buffer directly
We want to be a wrapper of the GtkText, which in turn
wraps the GtkEntryBuffer. Not some weird mix.
Matthias Clasen [Thu, 28 Feb 2019 03:42:27 +0000 (22:42 -0500)]
treeview: Stop using set_focus_child
Do this with an event controller on the buttons instead.
Nirbheek Chauhan [Wed, 27 Feb 2019 14:46:22 +0000 (14:46 +0000)]
Merge branch 'alatiera/python3' into 'master'
build: Use python3 for the post install script
See merge request GNOME/gtk!608
Jordan Petridis [Tue, 26 Feb 2019 22:55:08 +0000 (00:55 +0200)]
build: use condense the mkdir calls to oneliners
Jordan Petridis [Tue, 26 Feb 2019 22:51:55 +0000 (00:51 +0200)]
build: no need to replace path separators
Python APIs accept both `\` and `/` as path separators.
Jordan Petridis [Mon, 25 Feb 2019 05:09:35 +0000 (07:09 +0200)]
build: Use python3 for the post install script
While *some* systems alias python to python3 nowdays, this is
not true for eveything. Especially systems that can potentially
offer both python2 and python3.
According to both PEP 394 and PEP 441 its recommended to always
add the 3 in the shebang.
Jakub Steiner [Wed, 27 Feb 2019 11:10:56 +0000 (12:10 +0100)]
Adwaita: define insensitive links
- tone down the disabled/insensitive links.
Fixes issue #1645
Benjamin Otte [Mon, 25 Feb 2019 06:58:32 +0000 (07:58 +0100)]
xembed: Remove unused file
Benjamin Otte [Wed, 27 Feb 2019 06:29:57 +0000 (07:29 +0100)]
window: Return no item for no item name
Matthias Clasen [Tue, 26 Feb 2019 19:07:19 +0000 (14:07 -0500)]
window: Undo the deprection of gtk_window_present
After considerable discussion, we came to the conclusion
that the convenience of this API wins over the correctness
of gtk_window_present_with_time(), in particular since we
don't have a good mechanism to carry timestamps from the
events to the places where we present windows.
Matthias Clasen [Tue, 26 Feb 2019 13:16:48 +0000 (08:16 -0500)]
testsuite: Stop using grab-focus as a keybinding signal
We don't have that signal anymore.
Matthias Clasen [Tue, 26 Feb 2019 04:27:18 +0000 (23:27 -0500)]
widget: Remove the ::grab-focus signal
Nobody is connecting to this signal. And nobody
should.
Matthias Clasen [Tue, 26 Feb 2019 04:18:13 +0000 (23:18 -0500)]
container: Remove the ::set-focus-child signal
Nobody is connecting to this signal. And its
better that way.
Matthias Clasen [Mon, 25 Feb 2019 18:17:46 +0000 (18:17 +0000)]
Merge branch 'wip/hadess/window-present-docs' into 'master'
gtk_window_present() docs
See merge request GNOME/gtk!609
Bastien Nocera [Wed, 25 Jul 2018 15:48:52 +0000 (17:48 +0200)]
surface: Advise using gtk_window_present_with_time()
Rather than gtk_window_present()
Bastien Nocera [Wed, 25 Jul 2018 15:43:02 +0000 (17:43 +0200)]
window: Warn when gtk_window_present_with_time() is passed 0
When 0 or GDK_CURRENT_TIME is passed to gtk_window_present_with_time(),
print a warning so that the application developer knows that this isn't
a supported use of the function, but carry on working for now.
Bastien Nocera [Wed, 25 Jul 2018 15:42:26 +0000 (17:42 +0200)]
all: Don't warn about deprecated gtk_window_present usage
Avoid compilation warnings about internal users of gtk_window_present().
Bastien Nocera [Wed, 25 Jul 2018 15:18:55 +0000 (17:18 +0200)]
window: Deprecate gtk_window_present()
And expect gtk_window_present_with_time() to be used instead.
Bastien Nocera [Mon, 25 Feb 2019 16:31:14 +0000 (17:31 +0100)]
Add 4.0 deprecation warning macros
Note that functions deprecated in 4.0 will cause deprecation warnings
even with the pre-4.0 GTK development versions.
Matthias Clasen [Mon, 25 Feb 2019 14:21:56 +0000 (09:21 -0500)]
entry: Make placeholder-text work again
Timm Bäder [Sat, 23 Feb 2019 15:59:46 +0000 (16:59 +0100)]
gl renderer: Remove GskRoundedRect initializaion
Timm Bäder [Sun, 24 Feb 2019 08:14:23 +0000 (09:14 +0100)]
gl renderer: Partially implement rounded rect intersection
Some rounded rect intersections can actually be done and even expressed
as a single rounded rectangle.
Timm Bäder [Sun, 24 Feb 2019 08:09:02 +0000 (09:09 +0100)]
gl renderer: Add debug function to dump render node
Timm Bäder [Sat, 23 Feb 2019 06:57:12 +0000 (07:57 +0100)]
compare-render: Assert that no error has been set
Much better error message than just the one from the node != NULL
assertion in the next line.
Timm Bäder [Sat, 23 Feb 2019 06:50:51 +0000 (07:50 +0100)]
gl renderer: Stop determining the matrix category ourselves
Use the category we get from transform nodes and add ops_ API to supply
one when we set a graphene_matrix_t directly.
Matthias Clasen [Sun, 24 Feb 2019 20:29:08 +0000 (15:29 -0500)]
docs: Miscellaneous doc fixes
Additions and correction all over the place,
in GDK and GTK docs.
Matthias Clasen [Sun, 24 Feb 2019 18:56:09 +0000 (13:56 -0500)]
docs: Remove some no-longer-existing api
Matthias Clasen [Sun, 24 Feb 2019 18:32:24 +0000 (13:32 -0500)]
docs: Its just GTK now
Another round of + removal.
Piotr Drąg [Sun, 24 Feb 2019 15:59:47 +0000 (16:59 +0100)]
Update POTFILES.in
Matthias Clasen [Sun, 24 Feb 2019 15:53:23 +0000 (10:53 -0500)]
gdk: Rename our vulkan context to GTK
Not sure it shows up anywhere, but just for completeness.
Matthias Clasen [Sun, 24 Feb 2019 15:51:21 +0000 (10:51 -0500)]
docs: Its just GTK now
Remove the + from GTK+ in more places in the GDK docs.
Matthias Clasen [Sun, 24 Feb 2019 15:49:01 +0000 (10:49 -0500)]
docs: Its just GTK now
Remove the + from GTK+ in the GDK docs.
Matthias Clasen [Sun, 24 Feb 2019 15:44:15 +0000 (10:44 -0500)]
gitlab templates: Its just GTK now
More plus purging.
Matthias Clasen [Sun, 24 Feb 2019 15:40:17 +0000 (10:40 -0500)]
docs: Remove a mention of Gtkinvisible
Matthias Clasen [Sun, 24 Feb 2019 15:37:33 +0000 (10:37 -0500)]
docs: Some cosmetic fixups
Some leftover comments from the drawing model rewrite.
Matthias Clasen [Sun, 24 Feb 2019 04:15:43 +0000 (23:15 -0500)]
Revert "inspector: Make picking work again"
This reverts commit
5dbfb18d115862b894ee0a8db3083b2c6863192b.
Inspector picking no longer requries this.
Matthias Clasen [Sun, 24 Feb 2019 04:14:29 +0000 (23:14 -0500)]
Drop GtkInvisible
It was already private, and the previous commit removed
the last use.
Matthias Clasen [Sun, 24 Feb 2019 04:06:00 +0000 (23:06 -0500)]
inspector: Avoid grabs for inspecting
Instead of using a grab on a GtkInvisible, use
a hook in the GTK event propagation machinery to
get events.
The only downside of this approach is that we
lose the crosshair cursor. But we get rid of
the last use of GtkInvisible.
Matthias Clasen [Sun, 24 Feb 2019 04:26:59 +0000 (23:26 -0500)]
notebook: Document new apis
This silences gi build warnings.
Matthias Clasen [Sun, 24 Feb 2019 04:21:32 +0000 (23:21 -0500)]
transform: Fix a wrong annotation
It is (out caller-allocates), not (out) (caller-allocates).
Matthias Clasen [Sun, 24 Feb 2019 03:46:04 +0000 (03:46 +0000)]
Merge branch 'kill-register-surface' into 'master'
Remove gdk_surface_set_user_data
See merge request GNOME/gtk!605
Matthias Clasen [Sat, 23 Feb 2019 23:56:02 +0000 (18:56 -0500)]
Remove gdk_surface_set_user_data
Change gdk_surface_get/set_user_data to private
API and rename them to get/set_widget.
Also remove an unused associated function.
The last two places where the surface API is used
are in gtkroot.c and gtkwidget.c. Make them
use the private api.
Matthias Clasen [Sat, 23 Feb 2019 21:54:51 +0000 (16:54 -0500)]
gtk-demo: Stop using gdk_surface_get_user_data
Use gtk_root_get_for_surface instead.
Matthias Clasen [Sat, 23 Feb 2019 21:51:51 +0000 (16:51 -0500)]
inspector: Stop using gdk_surface_get_user_data
Use gtk_root_get_for_surface instead.
Matthias Clasen [Sat, 23 Feb 2019 21:55:20 +0000 (16:55 -0500)]
tooltip: Stop using gdk_surface_get_user_data
Use gtk_root_get_for_surface instead.
Matthias Clasen [Sat, 23 Feb 2019 21:53:19 +0000 (16:53 -0500)]
main: Stop using gdk_surface_get_user_data
Use gtk_root_get_for_surface instead.
Matthias Clasen [Sat, 23 Feb 2019 21:52:51 +0000 (16:52 -0500)]
xim: Stop using gdk_surface_get_user_data
Use gtk_root_get_for_surface instead.
Matthias Clasen [Sat, 23 Feb 2019 21:52:23 +0000 (16:52 -0500)]
ime: Stop using gdk_surface_get_user_data
Use gtk_root_get_for_surface instead.
Matthias Clasen [Sat, 23 Feb 2019 21:27:21 +0000 (16:27 -0500)]
Add gtk_root_get_for_surface
This is a replacement for gdk_surface_get_user_data.
Matthias Clasen [Sun, 24 Feb 2019 03:23:42 +0000 (22:23 -0500)]
a11y tests: Update output for entries
Matthias Clasen [Sun, 24 Feb 2019 02:24:00 +0000 (21:24 -0500)]
fixup: warn about nothing events
Matthias Clasen [Sat, 23 Feb 2019 23:23:42 +0000 (18:23 -0500)]
inspector: Make picking work again
This was broken by the change in
01f7f255b5 which
caused the inspector to not get any events anymore.
Revert that part, even though it may be technically
correct.
Matthias Clasen [Sat, 23 Feb 2019 22:06:28 +0000 (17:06 -0500)]
Quietly ignore GDK_NOTHING events
These don't have a surface, so we can't deliver
them via the ::event signal. But then, they're
good for nothing anyway.
Matthias Clasen [Sat, 23 Feb 2019 21:07:07 +0000 (16:07 -0500)]
docs: Refresh the "Q & A" part
Remove references to long-gone API, add some pointers
to more modern alternatives, etc.
Matthias Clasen [Sat, 23 Feb 2019 20:31:22 +0000 (15:31 -0500)]
gdk: Document surface signals
At least a little bit.
Matthias Clasen [Sat, 23 Feb 2019 21:05:35 +0000 (21:05 +0000)]
Merge branch 'drawing-model-refresh' into 'master'
doc: Rewrite the drawing model overview
See merge request GNOME/gtk!603
Matthias Clasen [Sat, 23 Feb 2019 17:51:35 +0000 (12:51 -0500)]
doc: Rewrite the drawing model overview
This is a first cut at updating the drawing model chapter
for the way we do things now. It introduces the scene graph and
render nodes, explains node caching and tree diffing, and removes
sections about subwindows.
Benjamin Otte [Sat, 23 Feb 2019 19:33:51 +0000 (19:33 +0000)]
Merge branch 'event-signal' into 'master'
Drop gdk_event_handler_set
See merge request GNOME/gtk!604
Matthias Clasen [Sat, 23 Feb 2019 18:56:51 +0000 (13:56 -0500)]
Drop gdk_event_handler_set
This is no longer used by GTK.
Matthias Clasen [Sat, 23 Feb 2019 18:56:07 +0000 (13:56 -0500)]
Drop some dead code
There were some internal uses of GdkEventFunc. Thankfully,
they were unused, so lets just drop them.
Matthias Clasen [Sat, 23 Feb 2019 18:51:54 +0000 (13:51 -0500)]
Stop using gdk_event_handler_set
We no longer need it.